package com.dsg.entity.account;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 交易帳目
 * </p>
 *
 * @author system
 * @since 2020-09-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dsg_account_trade")
@ApiModel(value = "DsgAccountTrade对象", description = "交易帳目")
public class DsgAccountTrade implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通过
     */
    public static final Integer DATA_STATUS_1 = 1;
    /**
     * 审批
     */
    public static final Integer DATA_STATUS_2 = 2;
    /**
     * 审批不通过
     */
    public static final Integer DATA_STATUS_3 = 3;
    /**
     * 收入
     */
    public static final String IN_OUT_INCOME = "IN";
    /**
     * 支出
     */
    public static final String IN_OUT_EXPENDITURE = "OUT";

    @TableId("OID")
    private String oid;

    @ApiModelProperty(value = "申请单号")
    @TableField("APP_NO")
    private String appNo;

    @ApiModelProperty(value = "企業編號")
    @TableField("ENT_CODE")
    private String entCode;

    @ApiModelProperty(value = "油公司")
    @TableField("OIL_COM")
    private String oilCom;

    @ApiModelProperty(value = "客戶/公司編碼")
    @TableField("CUS_NO")
    private String cusNo;

    @ApiModelProperty(value = "油咭編號")
    @TableField("CARD_NO")
    private String cardNo;

    @ApiModelProperty(value = "過數方式")
    @TableField("COUNT_MODE")
    private String countMode;

    @ApiModelProperty(value = "IN：收入 OUT：支出")
    @TableField("IN_OUT")
    private String inOut;

    @ApiModelProperty(value = "交易專案")
    @TableField("TRAN_ITEM")
    private Integer tranItem;

    @ApiModelProperty(value = "交易編碼")
    @TableField("TRAN_CODE")
    private String tranCode;

    @ApiModelProperty(value = "交易日期")
    @TableField("TRAN_DATE")
    private Date tranDate;

    @ApiModelProperty(value = "銀行名稱")
    @TableField("ACCOUNT_NAME")
    private String accountName;

    @ApiModelProperty(value = "銀行戶口")
    @TableField("ACCOUNT_NO")
    private String accountNo;

    @ApiModelProperty(value = "過數銀行名稱")
    @TableField("BANK_NAME")
    private String bankName;

    @ApiModelProperty(value = "過數銀行編碼")
    @TableField("BANK_CODE")
    private String bankCode;

    @ApiModelProperty(value = "結算月份")
    @TableField("SETTL_MONTH")
    private String settlMonth;

    @ApiModelProperty(value = "結單日期")
    @TableField("STATEMENT_DATE")
    private String statementDate;

    @ApiModelProperty(value = "新增日期")
    @TableField("CREATE_DATE")
    private Date createDate;

    @ApiModelProperty(value = "入帳日期")
    @TableField("IN_DATE")
    private Date inDate;

    @ApiModelProperty(value = "承前結欠")
    @TableField("PRE_DEPT")
    private BigDecimal preDept;

    @ApiModelProperty(value = "交易金額")
    @TableField("TRA_AMOUNT")
    private BigDecimal traAmount;

    @ApiModelProperty(value = "入油数据ID")
    @TableField("OIL_DATA_ID")
    private String oilDataId;

    @ApiModelProperty(value = "银行往来明细ID")
    @TableField("BANK_DETAIL_ID")
    private String bankDetailId;

    @ApiModelProperty(value = "百分比后交易金额")
    @TableField("TRA_AMOUNT_1")
    private BigDecimal traAmount1;

    @ApiModelProperty(value = "總結欠")
    @TableField("AFT_DEPT")
    private BigDecimal aftDept;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATER")
    private String creater;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATER")
    private String updater;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    @ApiModelProperty(value = "備註")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "費用調整次數")
    @TableField("COST_ADJ_TIMES")
    private Integer costAdjTimes;

    @ApiModelProperty(value = "序號")
    @TableField("SERIAL_NUMBER")
    private Integer serialNumber;

    /**
     * 数据状态 1通过 2审批
     */
    @ApiModelProperty(value = "数据状态")
    @TableField("DATA_STATUS")
    private Integer dataStatus;

    /************************查詢屬性**********************/
    @ApiModelProperty(value = "付款人")
    @TableField(exist = false)
    private String payer;

    /************************查詢條件**********************/
    @ApiModelProperty(value = "上午/下午 1:上午 2:下午")
    @TableField(exist = false)
    private String dateType;

    @ApiModelProperty(value = "創建日期開始")
    @TableField(exist = false)
    private String createTimeStart;

    @ApiModelProperty(value = "創建日期結束")
    @TableField(exist = false)
    private String createTimeEnd;

    @ApiModelProperty(value = "付款方式")
    @TableField(exist = false)
    private String payMode;

    @ApiModelProperty(value = "油公司 多間時以,號隔開")
    @TableField(exist = false)
    private String oilComs;

    @ApiModelProperty(value = "开始时间")
    @TableField(exist = false)
    private String beginDate;

    @ApiModelProperty(value = "结束时间")
    @TableField(exist = false)
    private String endDate;

    @ApiModelProperty(value = "入賬开始时间")
    @TableField(exist = false)
    private String beginInDate;

    @ApiModelProperty(value = "入賬结束时间")
    @TableField(exist = false)
    private String endInDate;

    @ApiModelProperty(value = "收款方式")
    @TableField(exist = false)
    private String payMethod;

    @ApiModelProperty(value = "銀行標識")
    @TableField(exist = false)
    private String bankId;

    @ApiModelProperty(value = "車牌號 多間時以,號隔開")
    @TableField(exist = false)
    private String carNos;

    @ApiModelProperty(value = "車牌號")
    @TableField(exist = false)
    private String carNo;

    @ApiModelProperty(value = "入油日期")
    @TableField(exist = false)
    private Date transDate;

    @ApiModelProperty(value = "入油升數")
    @TableField(exist = false)
    private BigDecimal oilLiters;

    @ApiModelProperty(value = "入油数据OID")
    @TableField(exist = false)
    private String dataDetailOid;

    @ApiModelProperty(value = "調整金額")
    @TableField(exist = false)
    private BigDecimal adjAmount;

    @ApiModelProperty(value = "入帳時間")
    @TableField(exist = false)
    private Date inTime;

    @ApiModelProperty(value = "地點")
    @TableField(exist = false)
    private String stationName;

    @ApiModelProperty(value = "產品")
    @TableField(exist = false)
    private String productName;

    @ApiModelProperty(value = "交易專案名称")
    @TableField(exist = false)
    private String tranItemName;

    @ApiModelProperty(value = "結算月份")
    @TableField(exist = false)
    private String settlementMonth;

    @TableField(exist = false)
    @ApiModelProperty(value = "油咭分類")
    private Integer cardClassify;

    @TableField(exist = false)
    @ApiModelProperty(value = "月結單筆數")
    private Integer transactions;

    @TableField(exist = false)
    @ApiModelProperty(value = "油券數目")
    private Integer coupons;

    /************************枚舉**********************/
    public enum AppStatus {
        temporary(0), already(1),
        oilIn(1), discountValue(2), adminValue(3), cashDeduValue(4), autopay(7),
        deductOneYuan(14), deleteList(15);
        Integer code;

        AppStatus(int code) {
            this.code = code;
        }

        public Integer getCode() {
            return code;
        }
    }

}
